const Router = require('koa-router')

const cabinetController = require('../../controllers/cabinet')

const m = require('../../middlewares/admin_auth')

const router = new Router({ prefix: '/admin/api/v1/cabinet' })


router.get('/getList', m.auth,cabinetController.list);


router.post('/create', m.auth,cabinetController.create)


router.get('/detail/:id',m.auth, cabinetController.detail)


router.delete('/:id', m.auth, cabinetController.delete)


router.patch('/:id', m.auth, cabinetController.update)


router.get('/dict/:enterpriseId',m.auth, cabinetController.getCabinetByEntId)


module.exports = router
